package com.cloud.effecive;

import java.util.ArrayList;
import java.util.List;

import static java.util.Comparator.comparingInt;

public class TestLambda {
    public static void main(String[] args) {
        String aa = "aaa";
        String bb = "bb";
        String cc = "cccccc";

        List<String> list = new ArrayList<>();
        list.add(aa);
        list.add(bb);
        list.add(cc);

        list.sort(comparingInt(String::length));

    }
}
